﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Core
{
    public abstract class DataProvider
    {
        private static DataProvider instance;
        public static DataProvider Instance
        {
            get {
                if (instance == null)
                    instance = new SqlDataProvider("connectionString");
                return instance; }
        }

        public abstract object ExecuteNonQueryWithOutput(string outputParam, string spName, params object[] parameterValues);

        public abstract int ExecuteNonQuery(string spName, params object[] parameterValues);

        public abstract DataSet ExecuteDataset(string spName, params object[]parameterValues);

        public abstract IDataReader ExecuteReader(string spName, params object[]parameterValues);

        public abstract object ExecuteScalar(string spName, params object[]parameterValues); 
    }
}
